all: library
	mkdir -p ../bin; mv *.o ../bin/

%.o: %.cpp
	g++ -c -O2 -Wall -Wextra -pedantic -lboost_thread -lpthreads $<

library-objects = \
	Prime.o \
	NumCores_Linux.o \
	o-RSA.o \

bigInt-objects = \
	../bin/BigUnsigned.o \
	../bin/BigInteger.o \
	../bin/BigIntegerAlgorithms.o \
	../bin/BigUnsignedInABase.o \
	../bin/BigIntegerUtils.o \

library-headers = \
	Prime.h \
	NumCores_Linux.h \
	o-RSA.h \

library: $(library-objects)

$(library-objects): $(bigInt-objects) $(thread-objects) $(library-headers)

$(bigInt-objects):
	cd bigInt; make

clean:
	cd ../bin/; rm $(library-objects); cd ../o-RSA/bigInt; make clean
